#pragma once
#include "Command.h"
#include "AniSystem.h"
#include "UpdateProcess.h"
#include "RenderProcess.h"

namespace bs
{
	class BattleGround;

	class AniController : public ICommandProcessor, public IAniSystemListener, public IUpdateable, public IRenderable
	{
		DECLARE_COMMAND_MAP()

	public:
		AniController(BattleGround& bg);
		~AniController();

		virtual void Update(size_t time, size_t frames, size_t elapse);
		virtual void Render(HDC dc);

		virtual void OnAniBegin();
		virtual void OnAniEnd();

	private:
		void OnActorPlace(const Command& cmd);
		void OnActorMove(const Command& cmd);
		void OnActorAttack(const Command& cmd);
		void OnActorDamage(const Command& cmd);

	private:
		AniSystem* aniSys;
		BattleGround& bg;
	};
}


